<!--
 * @Author: Karl Liris
 * @Date: 2021-03-04 14:50:42
 * @LastEditTime: 2021-03-04 16:01:02
-->
<template>
  <div>
    <slot name="header">张涛</slot>
    <div style="background: #f0f">头部</div>
    <slot></slot>
    <p style="background: #0ff">我这个组件需要干点啥</p>
    <slot name="footer"></slot>
  </div>
</template>

<script>
export default {
  props: {
    name: {
      type: String,
      default: '张涛',
    },
    options: {
      type: Object,
      default() {
        return {
          a: 1,
        };
      },
    },
  },
  methods: {
    say() {
      this.$emit('click', this.options.a);
    },
  },
};
</script>